#ifndef __NLS_ENDIAN__
#define __NLS_ENDIAN__

namespace Endian {
	enum Kind { UNKNOWN = -1, LITTLE, BIG };

	Kind endian();

	void init();

	short swapShort(short);
	short noSwapShort(short);
	int swapLong(int);
	int noSwapLong(int);
	float swapFloat(float);
	float noSwapFloat(float);
	double swapDouble(double);
	double noSwapDouble(double);

	extern short (*bigShort) (short s);
	extern short (*littleShort) (short s);
	extern int (*bigLong) (int i);
	extern int (*littleLong) (int i);
	extern float (*bigFloat) (float f);
	extern float (*littleFloat) (float f);
	extern double (*bigDouble) (double f);
	extern double (*littleDouble) (double d);
}

#endif // __NLS_ENDIAN__